using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace WFTest.Entity
{
    public partial class Model4 : DbContext
    {
        public Model4()
            : base("name=Model4")
        {
        }

        public virtual DbSet<cost_summary> cost_summary { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<cost_summary>()
                .Property(e => e.period)
                .IsUnicode(false);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.output)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.co_material)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.revenue)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.co_people)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.co_labor)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.co_manu)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.profit)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.margin)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.rework)
                .IsUnicode(false);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.product)
                .IsUnicode(false);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.year)
                .IsUnicode(false);

            modelBuilder.Entity<cost_summary>()
                .Property(e => e.mouth)
                .IsUnicode(false);
        }
    }
}
